"""
_*_ : utf-8 _*_ 
@Time: 2023/11/18 20:59
@Author: LWK
@File: 082_selenium_handless
@Project: demo01
"""
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')

# chrome_options.binary_location = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'

browser = webdriver.Chrome(options=chrome_options)
url = 'https://www.baidu.com/'
browser.get(url)
browser.save_screenshot('../temp/baidu.png')
